<html>
    <head>

    </head>
    <body>
        <div>
            上下布局
        </div>
        <div class="container">
            <div class="sectionA" id="ftop">

            </div>
            <div class="sectionB" style="height: 50%;" id="fbottom">

            </div>
        </div>
        <div>左右布局</div>
        <div class="container">
            <div class="sectionA" style="float:left;height: 100%;width: 50%;">
            </div>
            <div class="sectionB" style="float:right;height: 100%;width: 50%;">
            </div>
        </div>
        <div>居中布局</div>
        <div class="container">
            <div class="smallContainer" id="center">

            </div>
        </div>
    </body>
    <style>
        body>*{
            margin:10px;
        }
        .container{
            width: 640px;
            height: 640px;
            background-color: bisque;
            position: relative;
        }
        .sectionA{
            background-color:chartreuse;
        }
        .sectionB{
            background-color: crimson;
        }
        .smallContainer{
            background-color: gold;
            width: 32px;
            height: 32px;
        }
        #ftop{
            height: 50%;
        }
        #fbottom{
            height: 50%;
        }
        #fleft{
            float:left;
            height: 100%;
            width: 50%;
        }
        #fright{
            float: right;
            height: 100%;
            width: 50%;
        }
        #center{
            position: relative;
            float: left;
            left: calc(50% - 16px);
            top: calc(50% - 16px);
        }
    </style>
</html>